@bridge-ds/core 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,24 @@ export declare function explorationStage(x: {
13
13
  archived?: boolean | null | undefined;
14
14
  files: readonly string[] | null | undefined;
15
15
  }): 'not-started' | 'exploring' | 'handed';
16
+ /** The words of a running exploration on its page, and on every row and card that lists it. */
17
+ export declare const EXPLORATION_STAGE_LABEL: {
18
+ readonly 'not-started': "Not started";
19
+ readonly exploring: "Exploring";
20
+ readonly archived: "Archived";
21
+ };
22
+ /**
23
+ * The one status tag of an exploration wherever it is listed (Changes rows, Home cards, tools): the words its page
24
+ * shows. Running: "Not started" while the branch only carries Bridge notes, else "Exploring". Archived: "Archived".
25
+ * After done exploring: where it stands ("Waiting for code", "Being built", "Shipped"). Never a check or a technical
26
+ * blocker: an exploration's guard check fails by design. `files` undefined (not read yet): null for a running one, so
27
+ * a row never guesses; null (the read failed): "Exploring", as on the page.
28
+ */
29
+ export declare function explorationStateLabel(x: {
30
+ status: ExplorationStatus;
31
+ archived?: boolean | null | undefined;
32
+ files?: readonly string[] | null | undefined;
33
+ }): string | null;
16
34
  export interface ContinueRef {
17
35
  number: number;
18
36
  name: string;
@@ -176,6 +176,27 @@ export declare function isHandedOff(p: Pick<ExplorationPullLike, 'labels' | 'bod
176
176
  * done exploring is the older promotion: promoted, open or merged.
177
177
  */
178
178
  export declare function explorationStatus(p: ExplorationPullLike): ExplorationStatus;
179
+ /**
180
+ * The pull request is an exploration right now: open with the `exploration` label (archived ones keep it), or a running
181
+ * exploration whose label is missing (isUnlabeledExploration: an open draft on an `explore/*` branch or with the
182
+ * Bridge block). Its guard check (EXPLORATION_CHECK) fails by design then, so every check summary leaves that check out
183
+ * (review-gate summarizeCi `exploration`): Studio, the MCP server and the CLI never read it as a problem. Any other
184
+ * pull request with that check failing still counts it.
185
+ */
186
+ export declare function isGuardedExploration(p: {
187
+ state?: string | undefined;
188
+ draft?: boolean | undefined;
189
+ labels?: readonly (string | {
190
+ name?: string;
191
+ })[] | null | undefined;
192
+ headRef?: string | null | undefined;
193
+ head?: {
194
+ ref?: string | null | undefined;
195
+ } | null | undefined;
196
+ body?: string | null | undefined;
197
+ }): boolean;
198
+ /** True for the guard check of an exploration (EXPLORATION_CHECK), by check run name or status context. */
199
+ export declare const isExplorationCheck: (name: string | null | undefined) => boolean;
179
200
  /** True while the label is on: the pull request must not merge (the CI check fails, Studio blocks the merge). */
180
201
  export declare const isActiveExploration: (labels: ExplorationPullLike["labels"]) => boolean;
181
202
  /** True for an archived exploration: hidden from the default lists, reachable from the Archived filter. */
@@ -605,8 +605,13 @@ export declare class GitHubClient {
605
605
  /** Every file path at a ref (branch, tag or sha), one API call. */
606
606
  listFiles(ref: string): Promise<string[]>;
607
607
  listPullRequests(state?: 'open' | 'closed' | 'all'): Promise<PullRequestSummary[]>;
608
- /** Commit statuses and check runs of a commit, folded into one state. */
609
- getChecks(sha: string): Promise<{
608
+ /**
609
+ * Commit statuses and check runs of a commit, folded into one state. `exploration`: the commit heads an exploration
610
+ * (explorations isGuardedExploration), so its guard check, failing by design, is left out (as review-gate summarizeCi).
611
+ */
612
+ getChecks(sha: string, opts?: {
613
+ exploration?: boolean | undefined;
614
+ }): Promise<{
610
615
  state: 'success' | 'failure' | 'pending' | 'none';
611
616
  checks: {
612
617
  name: string;